@use 'sass:math';

@function escape-number($value) {
    $int: math.floor($value);
    $fract: $value - $int;

    @if $fract == 0 {
        @return $int;
    }

    @while $fract != math.floor($fract) {
        $fract: $fract * 10;
    }

    @return $int + '\\.'+ $fract; /* stylelint-disable-line scss/operator-no-unspaced */
}
